<?php
declare(strict_types=1);

namespace WebApp\lib\exception;

use Exception;
use Throwable;

/**
 * Class ParamErrorException
 * @package txz\common\third_lib\model\exception
 */
class InfoException extends Exception
{
    public $key = "";

    public function __construct($message = "", $code = 0, Throwable $previous = null) {
        $this->key = get_class($this) . "_bridge";
        if (!is_string($message)) {
            $GLOBALS[$this->key] = $message;
            $msg = $this->key;
        } else {
            $msg = $message;
        }

        parent::__construct($msg, $code, $previous);
    }
}
